#include "pagesearchwindow.h"
#include "ui_pagesearchwindow.h"

PageSearchWindow::PageSearchWindow(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::PageSearchWindow)
{
    ui->setupUi(this);
    setAttribute(Qt::WA_StyledBackground);
}

PageSearchWindow::~PageSearchWindow()
{
    delete ui;
}

void PageSearchWindow::paintEvent(QPaintEvent *event)
{
    QWidget *p = qobject_cast<QWidget*>(parent());
    // 更新窗口位置
    move(p->width() - 100 - width() , 80);
}

void PageSearchWindow::on_search_clicked()
{
    emit search(this->ui->lineEdit->text());
}

